package edu.sctu.practice.class02.Wangpeng.Assign03.Assign303;


import edu.sctu.practice.class01.nieyu.assign03.assign03_3.Cloneable;

/**
 * Created by wp on 2015/11/16.
 */
public class CloneableCircle extends Circle implements Cloneable{
    private Name creator=new Name("wang","da","peng");

    public CloneableCircle(double radius){
        super(radius);
    }

    public Name getCreator(){
        return creator;
    }
    public void setCreator(Name name){
        creator=name;
    }
    public Object clone(){
        Object o=null;
        try{
            o=(CloneableCircle)super.clone();
        }catch(CloneNotSupportedException ex){
            return null;
        }
        return o;
    }
    public String toString(){
        return super.toString()+""+creator.getFullname();
    }

}


